<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>数据移动 - Powered By Betou</title>
<meta name="author" content="Betou Team" />
<meta name="copyright" content="Betou" />
<link href="${base}/res/betou_template/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/common.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/movedata.js"></script>

<link href="${base}/res/betou_template/js/jqueryui/jquery.ui.autocomplete.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/thirdparty/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/jqueryui/jquery.ui.autocomplete.min.js"></script>

<script type="text/javascript">
$().ready(function() {
	var $inputForm = $("#inputForm");

	var $selectAll = $("#inputForm .selectAll");
	$selectAll.click(function() {
		var $this = $(this);
		var $thisCheckbox = $this.closest("tr").find(":checkbox");
		if ($thisCheckbox.filter(":checked").size() > 0) {
			$thisCheckbox.prop("checked", false);
		} else {
			$thisCheckbox.prop("checked", true);
		}
		return false;
	});

	$inputForm.validate({
		rules: {
			moveDatas:"required",
			fromUser:{
				required: true,
				remote:{
					url:"v_check_username.jspx",
					cache:false
				}
			},
			toUser:{
				required: true,
				remote:{
					url:"v_check_username.jspx",
					cache:false
				}
			}
		},
		messages: {
			fromUser: {
				remote: "该用户不存在"
			},
			toUser: {
				remote: "该用户不存在"
			}
		}
	});

	$( "#fromUser" ).autocomplete({
		source: "v_user.jspx",
		minLength: 1,
		focus: function( event, ui ) {
			$( this ).val( ui.item.name );
			return false;
		},
	
		select: function( event, ui ) {
			$( this ).val( ui.item.name );
			return false;
		}
	}).data( "ui-autocomplete" )._renderItem = function( ul, item ) {
			return $( "<li>" ).append( "<a>" + item.name + "</a>" ).appendTo( ul );
	};

	$( "#toUser" ).autocomplete({
		source: "v_user.jspx",
		minLength: 1,
		focus: function( event, ui ) {
			$( this ).val( ui.item.name );
			return false;
		},
	
		select: function( event, ui ) {
			$( this ).val( ui.item.name );
			return false;
		}
	}).data( "ui-autocomplete" )._renderItem = function( ul, item ) {
			return $( "<li>" ).append( "<a>" + item.name + "</a>" ).appendTo( ul );
	};
	
});
</script>
<style type="text/css">
.authorities label {
	min-width: 100px;
	_width: 100px;
	display: block;
	float: left;
	padding-right: 4px;
	_white-space: nowrap;
}
</style>
</head>
<body class="content">
	<div class="path">
		<a href="../index.jspx">首页</a> &raquo; 数据移动 
	</div>
	<form id="inputForm" action="o_move.jspx" method="post">
		<table class="input">
			<tr class="authorities">
				<th>
					<span class="requiredField">*</span><a title="全选" class="selectAll" href="javascript:;"><span class="blue">[全选]</span>要移动的数据</a>
				</th>
				<td>
					<span class="fieldSet">
						<#list exts?keys as extKey>  
							<#assign extValue=exts[extKey] >  
							<label><input type="checkbox"  name="moveDatas"  value="${extKey}" title="移动【${extValue}】的数据" />${extValue}</label>
						</#list>  
					</span>
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>从用户</th>
				<td>
					<input name="fromUser"  type="text"  class="text" id="fromUser" maxlength="50" />
				</td>
			</tr>
			<tr>
				<th><span class="requiredField">*</span>移动到用户</th>
				<td>
					<input name="toUser"  type="text"  class="text" id="toUser" maxlength="50" />
				</td>
			</tr>
			<tr>
				<th>&nbsp;</th>
				<td>
					<input type="submit" class="button" value="确&nbsp;&nbsp;定" />
				</td>
			</tr>
		</table>
	</form>
	<#include "../footer.html"/>
</body>
</html>